import { tableColumns } from '@/model/order/AllOrder'
import { createOptions } from '@/utils/formMethod'

// 付款状态 切换表格按钮配置数组
const filterArr: string[] = [
  '全部',
  '待付款',
  '待发货',
  '已发货',
  '已完成',
  '已关闭',
  '售后中',
  '退款中',
]

// select的option选项配置数组
const opt1: string[] = [
  '全部',
  '普通订单',
  '代付订单',
  '送礼订单',
  '送礼社群版订单',
  '心愿订单',
  '扫码付款',
  '酒店订单',
  '维权订单',
  '周期购订单',
  '多人拼团订单',
  '知识付费订单',
]
const opt2: string[] = ['全部', '未维权', '维权中', '维权结束']
const opt3: string[] = ['全部', '快递发货', '上门自提', '同城配送']
const opt4: string[] = ['全部', '支付宝', '微信', '银联', '其他']
// 表格显示的枚举信息配置
export const tableEnum1: Array<Object> = [
  { text: '未查询到支付信息', color: 'red', icon: 'ExclamationCircleFilled' },
  { text: '支付宝支付', color: '#3a78f6', icon: 'AlipayCircleFilled' },
  { text: '微信支付', color: '#63c742', icon: 'WechatFilled' },
  { text: '银联支付', color: '#ce4646', icon: 'CreditCardFilled' },
  { text: '其他', color: '#efefef', icon: 'TransactionFilled' },
]
export const tableEnum2: Array<string> = [
  '未获取到订单状态',
  '待付款',
  '待发货',
  '已发货',
  '已完成',
  '已关闭',
  '售后中',
  '退款中',
  '订单关闭',
]
export const tableEnum3: Array<string> = ['未获取到售后信息', '未维权', '维权中', '维权结束']

// 自定义表单组件参数
// 列参数
export const columns: Array<tableColumns> = [
  { title: '商品', key: 'productName', width: 300 },
  { title: '单价/数量', key: 'qty' },
  { title: '售后', key: 'rightsProtectionStatus' },
  { title: '买家', key: 'receiverName' },
  { title: '下单时间', key: 'createTime' },
  { title: '订单状态', key: 'status' },
  { title: '实付金额', key: 'paidAmount' },
]
// 顶部信息参数
export const rowTop: Array<tableColumns> = [
  { title: '订单号', key: 'orderNo' },
  { title: '', key: 'payMethod' },
  { title: '外部订单号', key: 'externalPayNo' },
  { title: '支付流水号', key: 'externalPayNo' },
]

// get请求筛选参数
export const filterKeys: string[] = [
  'rightProtectionStatus',
  'type',
  'deliveryMethod',
  'payMethod',
  'orderStatus',
]
export const option1: Array<Object> = createOptions(opt1)
export const option2: Array<Object> = createOptions(opt2)
export const option3: Array<Object> = createOptions(opt3)
export const option4: Array<Object> = createOptions(opt4)
export const filterBtns: Array<Object> = createOptions(filterArr, 'key')
